<template>
	<view>
		<web-view :src="url"></web-view>
	</view>
</template>

<script setup lang="ts">
import { ref } from "vue";
import { receiptPdf } from '@/common/API/room'
import { onLoad } from "@dcloudio/uni-app"

const id = ref()
const url = ref()
onLoad((options)=>{
	id.value = options.id
	if(options.id){
		viewInvoice()
	}
})

const viewInvoice = async () => {
	url.value = await receiptPdf({
		id: id.value
	})
}
</script>

<style>

</style>
